function feeForDelivery(distance, freeDistance, interval, feeForInterval) {
	var temp;
	if (distance<freeDistance) temp = 0;
	else temp = distance-freeDistance;
	return ((temp*feeForInterval)/interval).toFixed(2);
}

function address(streetAndNumber, city, zipCode, country){
	var result = streetAndNumber + ", " + city;
	if (zipCode!=null && zipCode!="") result += ", " + zipCode;
	if (country!=null && country!="") result += ", " + country;
	return result;
}

function getXMLObject()  //XML OBJECT
{
   var xmlHttp = false;
   try {
     xmlHttp = new ActiveXObject("Msxml2.XMLHTTP")  // For Old Microsoft Browsers
   }
   catch (e) {
     try {
       xmlHttp = new ActiveXObject("Microsoft.XMLHTTP")  // For Microsoft IE 6.0+
     }
     catch (e2) {
       xmlHttp = false   // No Browser accepts the XMLHTTP Object then false
     }
   }
   if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
     xmlHttp = new XMLHttpRequest();        //For Mozilla, Opera Browsers
   }
   return xmlHttp;  // Mandatory Statement returning the ajax object created
}
 
 
